import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class UniqueCodeConfigService {
  private segmentTypes = {};

  registerSegmentType(type: string, component: any) {
    this.segmentTypes[type] = component;
  }

  getSegmentComponent(type: string) {
    return this.segmentTypes[type];
  }

  getSegmentTypes() {
    return Object.keys(this.segmentTypes);
  }
}